<template>
  <div class="block-box">
    <div class="corner-lb"></div>
    <div class="corner-rb"></div>
    <h3 class="task-title">
      <!-- 飞手统计<img class="icon" :src="getImageUrl('leftbg10.png')" alt="" /> -->
      媒体资源<img class="icon" :src="getImageUrl('leftbg10.png')" alt="" />
    </h3>
    <!-- <div class="task-num">
      <div class="task-list">
        <div>
          <img
            class="task-icon"
            src="../../../../../assets/dp_fxsj_icon1.png"
            alt=""
          />
        </div>
        <div class="task-con">
          <p>123</p>
          <p class="task-con-tit">在线飞手</p>
        </div>
      </div>
      <div class="task-list">
        <div>
          <img
            class="task-icon"
            src="../../../../../assets/dp_fxsj_icon2.png"
            alt=""
          />
        </div>
        <div class="task-con">
          <p>265</p>
          <p class="task-con-tit">注册飞手</p>
        </div>
      </div>
      <div class="task-list">
        <div>
          <img
            class="task-icon"
            src="../../../../../assets/dp_fxsj_icon3.png"
            alt=""
          />
        </div>
        <div class="task-con">
          <p>64</p>
          <p class="task-con-tit">已注销飞手</p>
        </div>
      </div>
    </div> -->
    <div class="content_box">
      <div class="up_box">
        <div class="up_box_content">
          <div class="box">
            <img class="img" src="/static/fxsj/fxsj_icon2.png">
            <div style="margin-left: 1vh;font-size: 1.5vh;">
              <div style="font-size: 1.6vh;">照片</div>
              <div style="font-size: 1.4vh;">12文件</div>
            </div>
          </div>
          <div class="box2">
            <div class="t"><span class="num">0</span> M</div>
            <div class="progress_box">
              <div class="progress"></div>
            </div>
          </div>
        </div>
        <div class="up_box_content">
          <div class="box">
            <img class="img" src="/static/fxsj/fxsj_icon1.png">
            <div style="margin-left: 1vh;font-size: 1.5vh;">
              <div style="font-size: 1.6vh;">视频</div>
              <div style="font-size: 1.4vh;">6文件</div>
            </div>
          </div>
          <div class="box2">
            <div class="t"><span class="num">0</span> M</div>
            <div class="progress_box">
              <div class="progress"></div>
            </div>
          </div>
        </div>
      </div>
      <div class="down_box">
        <ElProgress type="dashboard" :percentage="75" :stroke-width="12" color="#24E5F1">
          <template #default="{ percentage }">
            <span class="percentage-value">
              <div style="color: #FFFFFF;font-size: 2vh;margin-bottom: 0.5vh;">{{ percentage }}%</div>
            </span>
            <span class="percentage-label">
              <div style="color: #FFFFFF;font-size: 1.5vh;">使用率</div>
            </span>
          </template>
        </ElProgress>
        <div class="text_box">
          <div class="title">
            媒体数据
          </div>
          <div class="text_box_content">
            <div class="p_box">
              <div class="p1">总资源</div>
              <div class="p2"><span class="num">200</span>MB</div>
            </div>
            <div class="p_box">
              <div class="p1">已占资源</div>
              <div class="p2"><span class="num">15</span>MB</div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script lang="ts" setup>
import { Picture, VideoCameraFilled } from "@element-plus/icons-vue";
import { dividerProps, ElProgress } from "element-plus";
import { ref, onMounted, onBeforeUnmount, defineProps } from "vue";
const props = defineProps({ taskMoreList: Array });
const getImageUrl = (name: string) => {
  return new URL(`../../../../../assets/${name}`, import.meta.url).href;
};
</script>


<style lang="scss" scoped>
.block-box {
  height: 28vh;
  background: rgb(2 19 20 / 52%);
  border: 1px solid;
  border-image: radial-gradient(circle,
      rgb(36 229 241 / 17%),
      rgb(255 255 255 / 17%)) 1 1;
  position: relative;
  margin-top: 0.5vh;
  position: relative;

  &::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 0px;
    width: 22px;
    height: 22px;
    border-top: 1px solid #24e5f1;
    opacity: 0.4;
  }

  &::after {
    content: "";
    position: absolute;
    top: -1px;
    right: -1px;
    width: 22px;
    height: 22px;
    border-top: 1px solid #24e5f1;
    opacity: 0.4;
  }

  .corner-lb {
    content: "";
    position: absolute;
    bottom: -1px;
    left: -1px;
    width: 22px;
    height: 22px;
    border-bottom: 1px solid #24e5f1;
    border-left: 1px solid #24e5f1;
    opacity: 0.4;
  }

  .corner-rb {
    content: "";
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 22px;
    height: 22px;
    border-bottom: 1px solid #24e5f1;
    border-right: 1px solid #24e5f1;
    opacity: 0.4;
  }

  .task-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4vh;
    padding-left: 1.5vh;
    margin: 0;
    font-family: PingFangSC, "PingFang SC";
    font-size: 2vh;
    font-weight: 500;
    color: #fffefe;
    user-select: none;
    background: radial-gradient(ellipse 140% 300% at 100% 50%,
        rgba(1, 34, 35, 0.2) 28%,
        rgba(7, 217, 221, 0.7) 100%);

    .icon {
      width: 3vh;
      margin-right: 1vw;
    }
  }

  .task-num {
    height: 14vh;
    display: flex;
    align-items: center;
    justify-content: space-around;

    /* 允许换行 */
    .task-icon {
      // margin-left: 0.5rem;
      width: 7vh;
      height: 7vh;
    }

    .task-list {
      // padding: 15px 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex: 0 0 33.333%;
    }

    .task-con {
      margin-left: 1vh;
      font-size: 2.5vh;

      .task-con-tit {
        font-size: 1.5vh;
        margin-top: 1vh;
      }
    }
  }

  .content_box {
    height: 24vh;
    // display: flex;

    .up_box {
      display: flex;
      align-items: center;
      padding: 1vh 0.5vh;
      height: 10vh;

      .up_box_content {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin: 0 0.5vh;
        padding: 0.5vh;
        background: linear-gradient(90deg, rgba(0, 184, 187, 0.16) 0%, rgba(4, 187, 193, 0.14) 100%);

        .box {
          display: flex;
          align-items: center;
          white-space: nowrap;

          .img {
            width: 5vh;
          }
        }

        .box2 {
          padding-right: 1vh;
          color: #00B8BB;

          .t {
            text-align: right;
            padding-bottom: 0.5vh;
            font-size: 1.5vh;

            .num {
              font-size: 1.8vh;
            }
          }

          .progress_box {
            width: 5vw;
            height: 0.3vh;
            background-color: #1B4143;
            position: relative;

            .progress {
              width: 50%;
              height: 100%;
              background-color: #00B8BB;
              position: absolute;
              top: 0;
              right: 0;

            }
          }
        }
      }
    }

    .down_box {
      height: 14vh;
      display: flex;
      align-items: center;
      justify-content: center;

      :deep(svg>path:nth-child(1)) {
        stroke: #1B4143;
      }

      .text_box {
        margin-left: 2vh;

        .title {
          font-size: 1.8vh;
          padding-bottom: 1vh;
        }

        .text_box_content {
          display: flex;

          .p_box {
            display: flex;
            align-items: flex-end;

            .p1 {
              margin-right: 1vh;
              font-size: 1.5vh;
            }

            .p2 {
              font-size: 1.5vh;
              display: flex;
              align-items: flex-end;
            }

            .num {
              color: #24E5F1;
              font-size: 2vh;
            }
          }

          .p_box:nth-child(1) {
            margin-right: 1vh;
          }
        }
      }
    }

  }
}
</style>
